package com.micro.util;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class EncodeURIUtil {
    public static String encodeURIComponent(final String value)
    {
        try
        {
            return URLEncoder.encode(value, "UTF-8").replaceAll("\\+", "%20");
        }
        catch (final UnsupportedEncodingException e)
        {
            e.printStackTrace();
            return null;
        }
    }
}
